import request from '@/utils/request'

const api_name = 'bookType'

export default {
    // 条件查询带分页获得图书分类信息
    listBookType(searchObj) {
        return request({
            url: `${api_name}/list`,
            method: 'get',
            params: searchObj
        })
    },
    // 根据编号查询图书分类信息
    getBookTypeDetail(BookTypeNo) {
        return request({
            url: `${api_name}/${BookTypeNo}`,
            method: 'get'
        })
    },
    // 添加图书分类
    addBookType(form) {
        return request({
            url: `${api_name}`,
            method: 'post',
            data: form
        })
    },
    // 修改图书分类
    updateBookType(form) {
        return request({
            url: `${api_name}`,
            method: 'put',
            data: form
        })
    },
    // 批量删除图书分类
    deleteBookType(BookTypeNoList) {
        return request({
            url: `${api_name}/${BookTypeNoList}`,
            method: 'delete',
        })
    },
}
